# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=py3-setuptools-gettext
pkgver=0.1.11
pkgrel=1
pkgdesc="setuptools plugin for building mo files"
url="https://github.com/breezy-team/setuptools-gettext"
arch="noarch"
license="GPL-2.0-or-later"
depends="gettext"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/breezy-team/setuptools-gettext/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/setuptools-gettext-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	gpep517 install-wheel --destdir .testenv --prefix '' .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	gpep517 install-wheel --destdir "$pkgdir" \
		.dist/*.whl
}

sha512sums="
83b76cbda5e9794ef7893013dacff1529ac8950da97e7b1fe32bc048e2d3b31887bab2bcd788d952785fd63f2082f0d7167445057a647e1a2b08c890796ab0a6  py3-setuptools-gettext-0.1.11.tar.gz
"
